/*
 * @Author: wuqingchun
 * @Date: 2024-06-22 15:15:10
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-06-23 14:54:08
 */
#ifndef __HTTP_FACTORY_H__
#define __HTTP_FACTORY_H__

#include <vector>

#include "http.h"
#include "http_event.h"
#include "http_logger.h"
#include "http_poller.h"
#include "http_parser.h"

class CHTTPConnFactory
{
public:
    CHTTPConnFactory(CHTTPLogger& refLogger, HTTP_CONF_S& refConf, CHTTPEventPoller& refPoller);
    ~CHTTPConnFactory();
    IHTTPEvent* CreateListener();
    IHTTPEvent* CreateAcceptor(IHTTPEvent& refListener);
    
private:
    CHTTPLogger& m_refLogger;
    HTTP_CONF_S& m_refConf;
    std::vector<IHTTPEvent*> m_vecEvents;
    CHTTPEventPoller& m_refPoller;

    std::vector<CHTTPParser*> m_vecParsers;
};

#endif //__HTTP_FACTORY_H__